<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品列表</title>
    <link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="/css/list.css">
    <script src="/libs/jquery-3.5.1.min.js"></script>
</head>
<body>
   <header></header>
    <main>
        <nav>
            <div class="nav-warp w clearfix">
                <ul id="nav_list_warp">
                   
                </ul>
                <script type="text/html" id="nav_list">
                    {{each navList item}}
                         <li><a href="/html/list.html?search={{item.word}}">{{item.word}}</a></li>
                    {{/each}}
                </script>
                <form onsubmit="return false">
                    <i class="search-icon" id='searchIcon'></i>
                    <input type="text" id='searchInput' autocomplete="off">
                    <div class="links">
                        <a href="javascript:;">如来神掌</a>
                        <a href="javascript:;">鸡毛掸子</a>
                    </div>
                    <ul id="title">
                    </ul>
                </form>
            </div>
            <div class="nav-info-warp">
                <ul class='nav-info w' id='nav-info-warp'>
                </ul>
                <script type='text/html' id='nav-info'>
                    {{each groupList item}}
                        <li>
                            <h3>品牌</h3>
                            <ul>
                                {{each item shop}}
                                    <li>
                                        <a href="/html/shopinfo.html?id={{shop.id}}"><img src="{{shop.image}}" alt=""></a>
                                        <span>{{shop.commodityId}}</span>
                                    </li>
                                {{/each}}
                            </ul>
                        </li>
                    {{/each}}
                </script>
            </div>
        </nav>
        <div class="list w">
            <div class="sort">
                <span class="zhonghe active" data-type=1>综合排序</span>
                <i>·</i>
                <span class="up" data-type=2>价格低到高</span>
                <i>·</i>
                <span class="down" data-type=3>价格高到低</span>
            </div>
            <ul class="listContent" id="list_shopList_warp">
               
            </ul>
            <script type='text/html' id='list_shopList'>
                {{if data.emptyMsg}}
                     <h1>没有找到相关商品，试试搜索其他商品吧</h1>
                 {{/if}}
                {{each list item}}
                    <li data-id={{item.id}}>
                        {{if item.couponValue}}
                            <span class="huodong">{{item.couponValue}}</span>
                        {{/if}}
                        {{if item.type===2}}
                            <span class="huodong">广告</span>
                         {{/if}}
                        <a href="/html/shopinfo.html?id={{item.id}}">
                            <img src="{{item.image}}" alt="{{item.qunTitle}}">
                        </a>
                        {{if item.type===1}}
                            <div class="title">{{item.title}}</div>
                            <p>{{item.qunTitle}}</p>
                            <div class="style">
                                <span>添加成功</span>
                                <button class='add-to-cart'>加入购物车</button>
                            </div>
                            <div class="price">￥<span>{{item.price}}</span><i>￥{{item.originPrice}}</i></div>
                        {{/if}}
                    </li>
                {{/each}}
            </script>
            <div id="pager" class="pager clearfix">
            </div>
        </div>
    </main>
    <footer></footer>
</body>
<script src="/libs/require/require.min.js" data-main="/js/list/list"></script>
</html>